﻿using System.Text.Encodings.Web;
using System.Text.Json;
using System.Text.Unicode;

namespace VisionCloud.MeasureIMCore
{
    public static class SerializeExtension
    {
        public static string SerializeObject<T>(this T obj)
        {
            return JsonSerializer.Serialize(obj, new JsonSerializerOptions()
            {
                Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
            });
        }
    }
}